|
|
|
|
<Buffer type>.DecryptAsymmetricEnvelopped (Función) // Encrypting a character string //--------------------------------------- bufToEncrypt is Buffer = "Message to encrypt" bufEncryptedMessage is Buffer sPublicKeyFile is string = fExeDir() + "\PublicKey.pem" sPublicKeyPassword is string = "xxx" bufEncryptedMessage = bufToEncrypt.EncryptAsymmetricEnveloped(sPublicKeyFile, ... sPublicKeyPassword) // Decryption // ------------- bufEncryptedMessage is Buffer bufDecryptedMessage is Buffer sPrivateKeyFile is string = fExeDir() + "\PrivateKey.pem" sPrivateKeyPassword is string = "xxx" bufDecryptedMessage = bufEncryptedMessage.DecryptAsymmetricEnveloped(sPrivateKeyFile, ... sPrivateKeyPassword) bufToEncrypt is Buffer = "Message to encrypt" bufEncryptedMessage is Buffer bufPublicKey is Buffer bufPrivateKey is Buffer (bufPrivateKey, bufPublicKey) = EncryptGenerateRSAKey(1024) // Encrypting a character string //--------------------------------------- bufEncryptedMessage = bufToEncrypt.EncryptAsymmetricEnveloped(bufPublicKey) // Decryption // ------------- bufEncryptedMessage is Buffer bufDecryptedMessage is Buffer bufDecryptedMessage = bufEncryptedMessage.DecryptAsymmetricEnveloped(bufPrivateKey) Sintaxis
<Result> = <Content to decrypt>.DecryptAsymmetricEnveloped(<Private key file> [, <Password>])
<Result>: Buffer Contenido desencriptado. <Content to decrypt>: Buffer Mensaje a desencriptar correspondiente al contenido de <Buffer type>.EncryptAsymmetricEnvelopped. <Private key file>: Cadena de caracteres o memoria intermedia - Nombre y ruta del archivo que corresponde a la clave privada RSA que se utilizará para descifrar los datos. Los formatos de clave pem, y p12 están soportados.
- Buffer que contiene la clave privada RSA que se utilizará para descifrar los datos.
<Password>: Cadena de caracteres opcional Contraseña del archivo de claves (si es necesario).
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|